package com.leaves.common.operator.factory;


import cn.hutool.extra.spring.SpringUtil;
import com.leaves.modular.buspicturefabulous.service.BusPictureFabulousService;
import com.leaves.modular.buspicturemanager.service.BusPictureManagerService;
import com.leaves.sys.modular.user.entity.SysUser;
import com.leaves.sys.modular.user.service.SysUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TimerTask;

/**
 * @Author Chenweiwei
 * @Date 2022/1/23 16:32
 * @Version 1.0
 */
public class OperatorTaskFactory {
    private static final Logger logger = LoggerFactory.getLogger(OperatorTaskFactory.class);


    private static final BusPictureManagerService busPictureManagerService = SpringUtil.getBean(BusPictureManagerService.class);



    public static TimerTask createUpdateNumberLikesTask(Long pictureId) {
        return new TimerTask() {
            @Override
            public void run() {
                busPictureManagerService.freshNumber(pictureId);
            }
        };
    }
}
